<?php if (!defined('insite')) die("no access"); 
require "opt.php";
$content = new content();
$content->out_content("theme/".$config["theme"]."/them/how2stat_h.them");
$faqhandle = opendir("./faq"); 
$array = get_defined_constants(true);
$content->set('|siteaddress|', $config["siteaddress"]);

while (false !== ($file = readdir($faqhandle))) 
{ 
	if ($file != "." && $file != "..") 
	{
		$content->set('|file|', $file);
		$content->set('|title_file|', $array["user"]["title_".$file]);
		if(substr($file,4,3)!="php" && $file!=".htaccess")	$content->out_content("theme/".$config["theme"]."/them/how2stat_m.them");
	} 			
}		
closedir($faqhandle);
$content->out_content("theme/".$config["theme"]."/them/how2stat_c.them");
if ($_GET["faq"])
{
		 $pagefile = preg_replace("/[^a-zA-Z0-9_-]/i", "", substr($_GET["faq"],0,11)); 
		 if(file_exists("faq/".$pagefile)) echo str_replace("\n","<br>",bbcode(file_get_contents("faq/".$pagefile)));
		 else echo "<div align='center' valign='center' class='warnms'>".mm_manager_emsg."</div>";
}else echo str_replace("\n","<br>",bbcode(file_get_contents("faq/aboutgame")));
$content->out_content("theme/".$config["theme"]."/them/how2stat_f.them");